#!/bin/bash
# 需 sudo 运行
set -e

mkdir -p /etc/docker
cat > /etc/docker/daemon.json <<'EOF'
{
  "registry-mirrors": [
    "https://docker.1ms.run",
    "https://mirrors.tuna.tsinghua.edu.cn/docker-ce",
    "https://mirrors.aliyun.com/docker-ce",
    "https://hub-mirror.c.163.com",
    "https://mirror.baidubce.com",
    "https://docker.xuanyuan.me"
  ]
}
EOF

systemctl daemon-reload
systemctl restart docker